<template>
  <!-- 面包屑 -->
  <el-breadcrumb separator="/">
    <el-breadcrumb-item>数据统计</el-breadcrumb-item>
    <el-breadcrumb-item>数据报表</el-breadcrumb-item>
  </el-breadcrumb>

  <div ref="chart" style="width: 600px;height:400px;"></div>
</template>

<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { GetReportFnc } from '@/api/report'
import * as echarts from 'echarts'

const chart = ref(null);
var options = {}

onMounted(async () => {
  const myChart = echarts.init(chart.value);  
  const res = await GetReportFnc()
  console.log(res)
  if(res.data.meta.status === 200) {
    options = res.data.data
  }
  myChart.setOption(options);
})
</script>